<template>
	<view>
		<u-popup v-bind="$attrs" v-on="$listeners" mode="bottom" border-radius="14" height="85%">
			<view class="u-flex button-style">
				<view class="middle-text can-button" @click="toClose">
					<text>取消</text>
				</view>
				<view class="middle-text sub-button u-flex " @click="show=false">
					<u-image width="30rpx" height="30rpx" src="/static/images/shopping/contact.png"></u-image>
					<text class="u-m-l-12" @click="toShowAddContactPerson">新增联系人</text>
				</view>
			</view>
			<view class="content u-p-t-10">
				<u-radio-group v-model="value" active-color="#178975" @change="toSubmit">
					<view class="info_item u-p-30 u-p-b-32 u-flex" v-for="(item,idx) in arrList" :key="">
						<view class="info_item_left u-flex">
							<u-radio :name="idx"></u-radio>
						</view>
						<view class="info_item_center u-p-l-29">
							<view class="u-m-b-10">
								<text class="label">游客姓名：</text>
								<text class="value">{{item.name}}</text>
							</view>
							<view class="u-m-b-10">
								<text class="label">联系方式：</text>
								<text class="value">{{item.phone}}</text>
							</view>
							<view>
								<text class="label">身份证号：</text>
								<text class="value">{{item.idNo}}</text>
							</view>
						</view>
						<view class="info_item_right u-flex-col u-row-right">
							<u-image width="30rpx" height="30rpx" src="/static/images/shopping/edior.png"
								@click="toShowAddContactPerson(idx)"></u-image>
						</view>
					</view>
				</u-radio-group>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: "",
				arrList: [{
					name: "寇乐",
					phone: "18892763512",
					idNo: "381928277189201923"
				}, {
					name: "寇乐",
					phone: "18892763512",
					idNo: "381928277189201923"
				}, {
					name: "寇乐",
					phone: "18892763512",
					idNo: "381928277189201923"
				}]
			}
		},
		props: {

		},
		methods: {
			toClose() {
				this.$emit("close")
			},

			toSubmit(name) {
				this.$emit("confirm", this.arrList[name])
			},
			toShowAddContactPerson(idx) {
				this.$emit("showAdd", this.arrList[idx])
			}
		},
		watch: {}
	}
</script>

<style lang="scss" scoped>
	.button-style {
		justify-content: space-between;
		padding: 25rpx;
		border-radius: 16rpx 16rpx 0 0;
		background: #F9F9F9;
		height: 98rpx;

		.can-button {
			font-family: PingFangSC-Medium;
			font-size: 32rpx;
			color: #838383;
			letter-spacing: 2.06rpx;
		}

		.sub-button {
			font-family: PingFangSC-Medium;
			font-size: 32rpx;
			color: #178975;
			letter-spacing: 2.06rpx;
		}
	}

	::v-deep .u-radio-group {
		display: block !important;
	}

	.content {
		.info_item {
			width: 100%;
			height: 202rpx;
			border-bottom: 1px solid #EDEDED;

			.info_item_left {
				height: 100%;
			}

			.info_item_center {
				height: 100%;
				width: 623rpx;

				.label {
					font-family: PingFangSC-Regular;
					font-size: 28rpx;
					color: #1E2221;
					letter-spacing: 1.8rpx;
					line-height: 40rpx;
				}

				.value {
					font-family: PingFangSC-Regular;
					font-size: 28rpx;
					color: #9f9f9f;
					letter-spacing: 1.8rpx;
					line-height: 40rpx;
				}
			}

			.info_item_right {
				height: 100%;
			}
		}
	}

	::v-deep .u-drawer {
		z-index: 10000!important;
		.u-mask {
			z-index: 10000!important;
			.u-drawer-content {
				z-index: 10000!important;
			}
		}
	}

</style>
